#include "scheduler/sequence_scheduler.h"
#include "../policy/policy_factory.h"
#include "../policy/behavior_tree/behavior_tree_sequence_policy.h"

namespace scheduler
{

SequenceScheduler::SequenceScheduler(const std::string &name)
    : AbstractScheduler(name)
{
    schedule_policy_ = policy::PolicyFactory<policy::BehaviorTreeSequencePolicy>::createPolicy(name);
}
bool SequenceScheduler::setTask(const task::AbstractTaskConstPtr &task)
{
    EASE_ERROR("sequence cannot set task");
    throw std::runtime_error("sequence scheduler cannot set task");
}
bool SequenceScheduler::setScheduler(const AbstractSchedulerConstPtr &scheduler)
{
    EASE_ERROR("sequence cannot set scheduler");
    throw std::runtime_error("sequence scheduler cannot set scheduler");
}
SequenceScheduler::~SequenceScheduler() = default;

}
